package acceptanceTests.search;

import junit.framework.TestCase;
import acceptanceTests.registration.RegistrationInt;
import acceptanceTests.registration.RegistrationProxy;

public class SearchTestStoryTest extends TestCase {
	RegistrationInt _forumRegimp = new RegistrationProxy();
	SearchTestInt _search= new SearchTestProxy(_forumRegimp.getServer());
	
	public SearchTestStoryTest(){
		super();
	}

	public void testSearch(){
		_search.register("user1","abc@gmail.com","password1");
		Object tTopic1 = _search.getLegalTopicForNewMessage("user1");
		Object tMessage =_search.writeNewMessageReturnsMessage("test4", "body4", tTopic1, "user1");
		assertTrue(_search.findSubject("test4")!="");
		_search.premoteUser("user1");
		_search.deletePost(tMessage);
		_forumRegimp.deleteRegisterUser("user1");
	}

}




